/*
 Navicat Premium Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : 127.0.0.1:3306
 Source Schema         : luffy

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 12/08/2021 21:25:57
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for auth_group
-- ----------------------------
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `auth_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of auth_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_group_permissions
-- ----------------------------
DROP TABLE IF EXISTS `auth_group_permissions`;
CREATE TABLE `auth_group_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
  KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of auth_group_permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
DROP TABLE IF EXISTS `auth_permission`;
CREATE TABLE `auth_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content_type_id` int(11) NOT NULL,
  `codename` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
  CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of auth_permission
-- ----------------------------
BEGIN;
INSERT INTO `auth_permission` VALUES (1, 'Can add log entry', 1, 'add_logentry');
INSERT INTO `auth_permission` VALUES (2, 'Can change log entry', 1, 'change_logentry');
INSERT INTO `auth_permission` VALUES (3, 'Can delete log entry', 1, 'delete_logentry');
INSERT INTO `auth_permission` VALUES (4, 'Can view log entry', 1, 'view_logentry');
INSERT INTO `auth_permission` VALUES (5, 'Can add permission', 2, 'add_permission');
INSERT INTO `auth_permission` VALUES (6, 'Can change permission', 2, 'change_permission');
INSERT INTO `auth_permission` VALUES (7, 'Can delete permission', 2, 'delete_permission');
INSERT INTO `auth_permission` VALUES (8, 'Can view permission', 2, 'view_permission');
INSERT INTO `auth_permission` VALUES (9, 'Can add group', 3, 'add_group');
INSERT INTO `auth_permission` VALUES (10, 'Can change group', 3, 'change_group');
INSERT INTO `auth_permission` VALUES (11, 'Can delete group', 3, 'delete_group');
INSERT INTO `auth_permission` VALUES (12, 'Can view group', 3, 'view_group');
INSERT INTO `auth_permission` VALUES (13, 'Can add content type', 4, 'add_contenttype');
INSERT INTO `auth_permission` VALUES (14, 'Can change content type', 4, 'change_contenttype');
INSERT INTO `auth_permission` VALUES (15, 'Can delete content type', 4, 'delete_contenttype');
INSERT INTO `auth_permission` VALUES (16, 'Can view content type', 4, 'view_contenttype');
INSERT INTO `auth_permission` VALUES (17, 'Can add session', 5, 'add_session');
INSERT INTO `auth_permission` VALUES (18, 'Can change session', 5, 'change_session');
INSERT INTO `auth_permission` VALUES (19, 'Can delete session', 5, 'delete_session');
INSERT INTO `auth_permission` VALUES (20, 'Can view session', 5, 'view_session');
INSERT INTO `auth_permission` VALUES (21, 'Can add User Widget', 6, 'add_userwidget');
INSERT INTO `auth_permission` VALUES (22, 'Can change User Widget', 6, 'change_userwidget');
INSERT INTO `auth_permission` VALUES (23, 'Can delete User Widget', 6, 'delete_userwidget');
INSERT INTO `auth_permission` VALUES (24, 'Can view User Widget', 6, 'view_userwidget');
INSERT INTO `auth_permission` VALUES (25, 'Can add User Setting', 7, 'add_usersettings');
INSERT INTO `auth_permission` VALUES (26, 'Can change User Setting', 7, 'change_usersettings');
INSERT INTO `auth_permission` VALUES (27, 'Can delete User Setting', 7, 'delete_usersettings');
INSERT INTO `auth_permission` VALUES (28, 'Can view User Setting', 7, 'view_usersettings');
INSERT INTO `auth_permission` VALUES (29, 'Can add log entry', 8, 'add_log');
INSERT INTO `auth_permission` VALUES (30, 'Can change log entry', 8, 'change_log');
INSERT INTO `auth_permission` VALUES (31, 'Can delete log entry', 8, 'delete_log');
INSERT INTO `auth_permission` VALUES (32, 'Can view log entry', 8, 'view_log');
INSERT INTO `auth_permission` VALUES (33, 'Can add Bookmark', 9, 'add_bookmark');
INSERT INTO `auth_permission` VALUES (34, 'Can change Bookmark', 9, 'change_bookmark');
INSERT INTO `auth_permission` VALUES (35, 'Can delete Bookmark', 9, 'delete_bookmark');
INSERT INTO `auth_permission` VALUES (36, 'Can view Bookmark', 9, 'view_bookmark');
INSERT INTO `auth_permission` VALUES (37, 'Can add revision', 10, 'add_revision');
INSERT INTO `auth_permission` VALUES (38, 'Can change revision', 10, 'change_revision');
INSERT INTO `auth_permission` VALUES (39, 'Can delete revision', 10, 'delete_revision');
INSERT INTO `auth_permission` VALUES (40, 'Can view revision', 10, 'view_revision');
INSERT INTO `auth_permission` VALUES (41, 'Can add version', 11, 'add_version');
INSERT INTO `auth_permission` VALUES (42, 'Can change version', 11, 'change_version');
INSERT INTO `auth_permission` VALUES (43, 'Can delete version', 11, 'delete_version');
INSERT INTO `auth_permission` VALUES (44, 'Can view version', 11, 'view_version');
INSERT INTO `auth_permission` VALUES (45, 'Can add 用户表', 12, 'add_user');
INSERT INTO `auth_permission` VALUES (46, 'Can change 用户表', 12, 'change_user');
INSERT INTO `auth_permission` VALUES (47, 'Can delete 用户表', 12, 'delete_user');
INSERT INTO `auth_permission` VALUES (48, 'Can view 用户表', 12, 'view_user');
INSERT INTO `auth_permission` VALUES (49, 'Can add banner', 13, 'add_banner');
INSERT INTO `auth_permission` VALUES (50, 'Can change banner', 13, 'change_banner');
INSERT INTO `auth_permission` VALUES (51, 'Can delete banner', 13, 'delete_banner');
INSERT INTO `auth_permission` VALUES (52, 'Can view banner', 13, 'view_banner');
INSERT INTO `auth_permission` VALUES (53, 'Can add 课程', 14, 'add_course');
INSERT INTO `auth_permission` VALUES (54, 'Can change 课程', 14, 'change_course');
INSERT INTO `auth_permission` VALUES (55, 'Can delete 课程', 14, 'delete_course');
INSERT INTO `auth_permission` VALUES (56, 'Can view 课程', 14, 'view_course');
INSERT INTO `auth_permission` VALUES (57, 'Can add 分类', 15, 'add_coursecategory');
INSERT INTO `auth_permission` VALUES (58, 'Can change 分类', 15, 'change_coursecategory');
INSERT INTO `auth_permission` VALUES (59, 'Can delete 分类', 15, 'delete_coursecategory');
INSERT INTO `auth_permission` VALUES (60, 'Can view 分类', 15, 'view_coursecategory');
INSERT INTO `auth_permission` VALUES (61, 'Can add 章节', 16, 'add_coursechapter');
INSERT INTO `auth_permission` VALUES (62, 'Can change 章节', 16, 'change_coursechapter');
INSERT INTO `auth_permission` VALUES (63, 'Can delete 章节', 16, 'delete_coursechapter');
INSERT INTO `auth_permission` VALUES (64, 'Can view 章节', 16, 'view_coursechapter');
INSERT INTO `auth_permission` VALUES (65, 'Can add 导师', 17, 'add_teacher');
INSERT INTO `auth_permission` VALUES (66, 'Can change 导师', 17, 'change_teacher');
INSERT INTO `auth_permission` VALUES (67, 'Can delete 导师', 17, 'delete_teacher');
INSERT INTO `auth_permission` VALUES (68, 'Can view 导师', 17, 'view_teacher');
INSERT INTO `auth_permission` VALUES (69, 'Can add 课时', 18, 'add_coursesection');
INSERT INTO `auth_permission` VALUES (70, 'Can change 课时', 18, 'change_coursesection');
INSERT INTO `auth_permission` VALUES (71, 'Can delete 课时', 18, 'delete_coursesection');
INSERT INTO `auth_permission` VALUES (72, 'Can view 课时', 18, 'view_coursesection');
INSERT INTO `auth_permission` VALUES (73, 'Can add 订单记录', 19, 'add_order');
INSERT INTO `auth_permission` VALUES (74, 'Can change 订单记录', 19, 'change_order');
INSERT INTO `auth_permission` VALUES (75, 'Can delete 订单记录', 19, 'delete_order');
INSERT INTO `auth_permission` VALUES (76, 'Can view 订单记录', 19, 'view_order');
INSERT INTO `auth_permission` VALUES (77, 'Can add 订单详情', 20, 'add_orderdetail');
INSERT INTO `auth_permission` VALUES (78, 'Can change 订单详情', 20, 'change_orderdetail');
INSERT INTO `auth_permission` VALUES (79, 'Can delete 订单详情', 20, 'delete_orderdetail');
INSERT INTO `auth_permission` VALUES (80, 'Can view 订单详情', 20, 'view_orderdetail');
COMMIT;

-- ----------------------------
-- Table structure for django_admin_log
-- ----------------------------
DROP TABLE IF EXISTS `django_admin_log`;
CREATE TABLE `django_admin_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `action_time` datetime(6) NOT NULL,
  `object_id` longtext,
  `object_repr` varchar(200) NOT NULL,
  `action_flag` smallint(5) unsigned NOT NULL,
  `change_message` longtext NOT NULL,
  `content_type_id` int(11) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
  KEY `django_admin_log_user_id_c564eba6_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `django_admin_log_user_id_c564eba6_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of django_admin_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for django_content_type
-- ----------------------------
DROP TABLE IF EXISTS `django_content_type`;
CREATE TABLE `django_content_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_label` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of django_content_type
-- ----------------------------
BEGIN;
INSERT INTO `django_content_type` VALUES (1, 'admin', 'logentry');
INSERT INTO `django_content_type` VALUES (3, 'auth', 'group');
INSERT INTO `django_content_type` VALUES (2, 'auth', 'permission');
INSERT INTO `django_content_type` VALUES (4, 'contenttypes', 'contenttype');
INSERT INTO `django_content_type` VALUES (14, 'course', 'course');
INSERT INTO `django_content_type` VALUES (15, 'course', 'coursecategory');
INSERT INTO `django_content_type` VALUES (16, 'course', 'coursechapter');
INSERT INTO `django_content_type` VALUES (18, 'course', 'coursesection');
INSERT INTO `django_content_type` VALUES (17, 'course', 'teacher');
INSERT INTO `django_content_type` VALUES (13, 'home', 'banner');
INSERT INTO `django_content_type` VALUES (19, 'order', 'order');
INSERT INTO `django_content_type` VALUES (20, 'order', 'orderdetail');
INSERT INTO `django_content_type` VALUES (10, 'reversion', 'revision');
INSERT INTO `django_content_type` VALUES (11, 'reversion', 'version');
INSERT INTO `django_content_type` VALUES (5, 'sessions', 'session');
INSERT INTO `django_content_type` VALUES (12, 'user', 'user');
INSERT INTO `django_content_type` VALUES (9, 'xadmin', 'bookmark');
INSERT INTO `django_content_type` VALUES (8, 'xadmin', 'log');
INSERT INTO `django_content_type` VALUES (7, 'xadmin', 'usersettings');
INSERT INTO `django_content_type` VALUES (6, 'xadmin', 'userwidget');
COMMIT;

-- ----------------------------
-- Table structure for django_migrations
-- ----------------------------
DROP TABLE IF EXISTS `django_migrations`;
CREATE TABLE `django_migrations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `applied` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of django_migrations
-- ----------------------------
BEGIN;
INSERT INTO `django_migrations` VALUES (1, 'contenttypes', '0001_initial', '2021-08-12 16:09:21.623855');
INSERT INTO `django_migrations` VALUES (2, 'contenttypes', '0002_remove_content_type_name', '2021-08-12 16:09:21.694515');
INSERT INTO `django_migrations` VALUES (3, 'auth', '0001_initial', '2021-08-12 16:09:21.792265');
INSERT INTO `django_migrations` VALUES (4, 'auth', '0002_alter_permission_name_max_length', '2021-08-12 16:09:21.983681');
INSERT INTO `django_migrations` VALUES (5, 'auth', '0003_alter_user_email_max_length', '2021-08-12 16:09:21.989224');
INSERT INTO `django_migrations` VALUES (6, 'auth', '0004_alter_user_username_opts', '2021-08-12 16:09:21.995459');
INSERT INTO `django_migrations` VALUES (7, 'auth', '0005_alter_user_last_login_null', '2021-08-12 16:09:22.001476');
INSERT INTO `django_migrations` VALUES (8, 'auth', '0006_require_contenttypes_0002', '2021-08-12 16:09:22.002990');
INSERT INTO `django_migrations` VALUES (9, 'auth', '0007_alter_validators_add_error_messages', '2021-08-12 16:09:22.008841');
INSERT INTO `django_migrations` VALUES (10, 'auth', '0008_alter_user_username_max_length', '2021-08-12 16:09:22.014183');
INSERT INTO `django_migrations` VALUES (11, 'auth', '0009_alter_user_last_name_max_length', '2021-08-12 16:09:22.019549');
INSERT INTO `django_migrations` VALUES (12, 'auth', '0010_alter_group_name_max_length', '2021-08-12 16:09:22.055888');
INSERT INTO `django_migrations` VALUES (13, 'auth', '0011_update_proxy_permissions', '2021-08-12 16:09:22.062186');
INSERT INTO `django_migrations` VALUES (14, 'user', '0001_initial', '2021-08-12 16:09:22.163339');
INSERT INTO `django_migrations` VALUES (15, 'admin', '0001_initial', '2021-08-12 16:09:22.447574');
INSERT INTO `django_migrations` VALUES (16, 'admin', '0002_logentry_remove_auto_add', '2021-08-12 16:09:22.523794');
INSERT INTO `django_migrations` VALUES (17, 'admin', '0003_logentry_add_action_flag_choices', '2021-08-12 16:09:22.531634');
INSERT INTO `django_migrations` VALUES (18, 'admin', '0003_auto_20200719_1056', '2021-08-12 16:09:22.598738');
INSERT INTO `django_migrations` VALUES (19, 'admin', '0004_merge_20210122_1816', '2021-08-12 16:09:22.600437');
INSERT INTO `django_migrations` VALUES (20, 'course', '0001_initial', '2021-08-12 16:09:22.864133');
INSERT INTO `django_migrations` VALUES (21, 'home', '0001_initial', '2021-08-12 16:09:23.010959');
INSERT INTO `django_migrations` VALUES (22, 'order', '0001_initial', '2021-08-12 16:09:23.104299');
INSERT INTO `django_migrations` VALUES (23, 'order', '0002_order_user', '2021-08-12 16:09:23.216068');
INSERT INTO `django_migrations` VALUES (24, 'reversion', '0001_squashed_0004_auto_20160611_1202', '2021-08-12 16:09:23.426205');
INSERT INTO `django_migrations` VALUES (25, 'reversion', '0002_auto_20200719_1056', '2021-08-12 16:09:23.667838');
INSERT INTO `django_migrations` VALUES (26, 'sessions', '0001_initial', '2021-08-12 16:09:23.703632');
INSERT INTO `django_migrations` VALUES (27, 'xadmin', '0001_initial', '2021-08-12 16:09:23.896043');
COMMIT;

-- ----------------------------
-- Table structure for django_session
-- ----------------------------
DROP TABLE IF EXISTS `django_session`;
CREATE TABLE `django_session` (
  `session_key` varchar(40) NOT NULL,
  `session_data` longtext NOT NULL,
  `expire_date` datetime(6) NOT NULL,
  PRIMARY KEY (`session_key`),
  KEY `django_session_expire_date_a5c62663` (`expire_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of django_session
-- ----------------------------
BEGIN;
INSERT INTO `django_session` VALUES ('1vt1im5w01mm4mpyyv4bbt7rwkc2hnim', 'MDM3ZjQyOTQwMzkxM2I5MThmYTA3ZjlmMGYwOTY2NjQ5ZjQzZmI3OTp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiIyYzRkMWJiNzE1NDU3ZDUwMmE5OGJiMTliNDRjYWExMDZiM2I2YTQxIiwiTElTVF9RVUVSWSI6W1siY291cnNlIiwiY291cnNlIl0sIiJdfQ==', '2021-08-26 16:16:02.953086');
COMMIT;

-- ----------------------------
-- Table structure for luffy_banner
-- ----------------------------
DROP TABLE IF EXISTS `luffy_banner`;
CREATE TABLE `luffy_banner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `orders` int(11) DEFAULT NULL,
  `name` varchar(32) NOT NULL,
  `link` varchar(32) NOT NULL,
  `img` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_banner
-- ----------------------------
BEGIN;
INSERT INTO `luffy_banner` VALUES (1, 0, 1, '2021-08-12 16:11:27.457397', '2021-08-12 16:11:27.457419', 1, 'banner1', 'free-course', 'banner/banner1_VN9xax3.png');
INSERT INTO `luffy_banner` VALUES (2, 0, 1, '2021-08-12 16:11:42.475240', '2021-08-12 16:11:42.475261', 2, 'banner2', 'light-course', 'banner/banner2_8NqcI7d.png');
INSERT INTO `luffy_banner` VALUES (3, 0, 0, '2021-08-12 16:11:58.507241', '2021-08-12 16:11:58.507306', 3, 'banner2', 'actual-course', 'banner/banner3_4zq7seU.png');
INSERT INTO `luffy_banner` VALUES (4, 0, 0, '2021-08-12 16:12:20.238704', '2021-08-12 16:12:20.238725', 4, 'banner4', 'home', 'banner/banner4_VRtFzxV.png');
COMMIT;

-- ----------------------------
-- Table structure for luffy_course
-- ----------------------------
DROP TABLE IF EXISTS `luffy_course`;
CREATE TABLE `luffy_course` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `orders` int(11) DEFAULT NULL,
  `name` varchar(128) NOT NULL,
  `course_img` varchar(255) DEFAULT NULL,
  `course_type` smallint(6) NOT NULL,
  `brief` longtext,
  `level` smallint(6) NOT NULL,
  `pub_date` date NOT NULL,
  `period` int(11) NOT NULL,
  `attachment_path` varchar(128) DEFAULT NULL,
  `status` smallint(6) NOT NULL,
  `students` int(11) NOT NULL,
  `sections` int(11) NOT NULL,
  `pub_sections` int(11) NOT NULL,
  `price` decimal(6,2) NOT NULL,
  `course_category_id` int(11) DEFAULT NULL,
  `teacher_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `luffy_course_course_category_id_ae7376a3` (`course_category_id`),
  KEY `luffy_course_teacher_id_0202c7b2_fk_luffy_teacher_id` (`teacher_id`),
  CONSTRAINT `luffy_course_teacher_id_0202c7b2_fk_luffy_teacher_id` FOREIGN KEY (`teacher_id`) REFERENCES `luffy_teacher` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_course
-- ----------------------------
BEGIN;
INSERT INTO `luffy_course` VALUES (1, 0, 1, '2019-07-14 13:54:33.095201', '2019-07-14 13:54:33.095238', 1, 'Python开发21天入门', 'courses/alex_python.png', 0, 'Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土&&&Python从入门到入土', 0, '2019-07-14', 21, '', 0, 231, 120, 120, 0.00, 1, 1);
INSERT INTO `luffy_course` VALUES (2, 0, 1, '2019-07-14 13:56:05.051103', '2019-07-14 13:56:05.051142', 2, 'Python项目实战', 'courses/mjj_python.png', 0, '', 1, '2019-07-14', 30, '', 0, 340, 120, 120, 99.00, 1, 2);
INSERT INTO `luffy_course` VALUES (3, 0, 1, '2019-07-14 13:57:21.190053', '2019-07-14 13:57:21.190095', 3, 'Linux系统基础5周入门精讲', 'courses/lyy_linux.png', 0, '', 0, '2019-07-14', 25, '', 0, 219, 100, 100, 39.00, 2, 3);
COMMIT;

-- ----------------------------
-- Table structure for luffy_course_Section
-- ----------------------------
DROP TABLE IF EXISTS `luffy_course_Section`;
CREATE TABLE `luffy_course_Section` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `name` varchar(128) NOT NULL,
  `orders` smallint(5) unsigned NOT NULL,
  `section_type` smallint(6) NOT NULL,
  `section_link` varchar(255) DEFAULT NULL,
  `duration` varchar(32) DEFAULT NULL,
  `pub_date` datetime(6) NOT NULL,
  `free_trail` tinyint(1) NOT NULL,
  `chapter_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `luffy_course_Section_chapter_id_4517c0af_fk_luffy_cou` (`chapter_id`),
  CONSTRAINT `luffy_course_Section_chapter_id_4517c0af_fk_luffy_cou` FOREIGN KEY (`chapter_id`) REFERENCES `luffy_course_chapter` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_course_Section
-- ----------------------------
BEGIN;
INSERT INTO `luffy_course_Section` VALUES (1, 0, 1, '2019-07-14 14:02:33.779098', '2019-07-14 14:02:33.779135', '计算机原理上', 1, 2, NULL, NULL, '2019-07-14 14:02:33.779193', 1, 1);
INSERT INTO `luffy_course_Section` VALUES (2, 0, 1, '2019-07-14 14:02:56.657134', '2019-07-14 14:02:56.657173', '计算机原理下', 2, 2, NULL, NULL, '2019-07-14 14:02:56.657227', 1, 1);
INSERT INTO `luffy_course_Section` VALUES (3, 0, 1, '2019-07-14 14:03:20.493324', '2019-07-14 14:03:52.329394', '环境搭建上', 1, 2, NULL, NULL, '2019-07-14 14:03:20.493420', 0, 2);
INSERT INTO `luffy_course_Section` VALUES (4, 0, 1, '2019-07-14 14:03:36.472742', '2019-07-14 14:03:36.472779', '环境搭建下', 2, 2, NULL, NULL, '2019-07-14 14:03:36.472831', 0, 2);
INSERT INTO `luffy_course_Section` VALUES (5, 0, 1, '2019-07-14 14:04:19.338153', '2019-07-14 14:04:19.338192', 'web项目的创建', 1, 2, NULL, NULL, '2019-07-14 14:04:19.338252', 1, 3);
INSERT INTO `luffy_course_Section` VALUES (6, 0, 1, '2019-07-14 14:04:52.895855', '2019-07-14 14:04:52.895890', 'Linux的环境搭建', 1, 2, NULL, NULL, '2019-07-14 14:04:52.895942', 1, 4);
COMMIT;

-- ----------------------------
-- Table structure for luffy_course_category
-- ----------------------------
DROP TABLE IF EXISTS `luffy_course_category`;
CREATE TABLE `luffy_course_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `orders` int(11) DEFAULT NULL,
  `name` varchar(64) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_course_category
-- ----------------------------
BEGIN;
INSERT INTO `luffy_course_category` VALUES (1, 0, 1, '2019-07-14 13:40:58.690413', '2019-07-14 13:40:58.690477', 1, 'Python');
INSERT INTO `luffy_course_category` VALUES (2, 0, 1, '2019-07-14 13:41:08.249735', '2019-07-14 13:41:08.249817', 2, 'Linux');
COMMIT;

-- ----------------------------
-- Table structure for luffy_course_chapter
-- ----------------------------
DROP TABLE IF EXISTS `luffy_course_chapter`;
CREATE TABLE `luffy_course_chapter` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `orders` int(11) DEFAULT NULL,
  `chapter` smallint(6) NOT NULL,
  `name` varchar(128) NOT NULL,
  `summary` longtext,
  `pub_date` date NOT NULL,
  `course_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `luffy_course_chapter_course_id_fa245b81_fk_luffy_course_id` (`course_id`),
  CONSTRAINT `luffy_course_chapter_course_id_fa245b81_fk_luffy_course_id` FOREIGN KEY (`course_id`) REFERENCES `luffy_course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_course_chapter
-- ----------------------------
BEGIN;
INSERT INTO `luffy_course_chapter` VALUES (1, 0, 1, '2019-07-14 13:58:34.867005', '2019-07-14 14:00:58.276541', 1, 1, '计算机原理', '', '2019-07-14', 1);
INSERT INTO `luffy_course_chapter` VALUES (2, 0, 1, '2019-07-14 13:58:48.051543', '2019-07-14 14:01:22.024206', 2, 2, '环境搭建', '', '2019-07-14', 1);
INSERT INTO `luffy_course_chapter` VALUES (3, 0, 1, '2019-07-14 13:59:09.878183', '2019-07-14 14:01:40.048608', 3, 1, '项目创建', '', '2019-07-14', 2);
INSERT INTO `luffy_course_chapter` VALUES (4, 0, 1, '2019-07-14 13:59:37.448626', '2019-07-14 14:01:58.709652', 4, 1, 'Linux环境创建', '', '2019-07-14', 3);
COMMIT;

-- ----------------------------
-- Table structure for luffy_order
-- ----------------------------
DROP TABLE IF EXISTS `luffy_order`;
CREATE TABLE `luffy_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(150) NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `out_trade_no` varchar(64) NOT NULL,
  `trade_no` varchar(64) DEFAULT NULL,
  `order_status` smallint(6) NOT NULL,
  `pay_type` smallint(6) NOT NULL,
  `pay_time` datetime(6) DEFAULT NULL,
  `created_time` datetime(6) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `out_trade_no` (`out_trade_no`),
  KEY `luffy_order_user_id_e450c68c` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for luffy_order_detail
-- ----------------------------
DROP TABLE IF EXISTS `luffy_order_detail`;
CREATE TABLE `luffy_order_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `price` decimal(6,2) NOT NULL,
  `real_price` decimal(6,2) NOT NULL,
  `course_id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `luffy_order_detail_course_id_eb4f1d29` (`course_id`),
  KEY `luffy_order_detail_order_id_57bb4e1a` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_order_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for luffy_teacher
-- ----------------------------
DROP TABLE IF EXISTS `luffy_teacher`;
CREATE TABLE `luffy_teacher` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_delete` tinyint(1) NOT NULL,
  `is_show` tinyint(1) NOT NULL,
  `created_time` datetime(6) DEFAULT NULL,
  `updated_time` datetime(6) DEFAULT NULL,
  `orders` int(11) DEFAULT NULL,
  `name` varchar(32) NOT NULL,
  `role` smallint(6) NOT NULL,
  `title` varchar(64) NOT NULL,
  `signature` varchar(255) DEFAULT NULL,
  `image` varchar(100) DEFAULT NULL,
  `brief` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_teacher
-- ----------------------------
BEGIN;
INSERT INTO `luffy_teacher` VALUES (1, 0, 1, '2019-07-14 13:44:19.661327', '2019-07-14 13:46:54.246271', 1, 'Alex', 1, '老男孩Python教学总监', '金角大王', 'teacher/alex_icon.png', '老男孩教育CTO & CO-FOUNDER 国内知名PYTHON语言推广者 51CTO学院20162017年度最受学员喜爱10大讲师之一 多款开源软件作者 曾任职公安部、飞信、中金公司、NOKIA中国研究院、华尔街英语、ADVENT、汽车之家等公司');
INSERT INTO `luffy_teacher` VALUES (2, 0, 1, '2019-07-14 13:45:25.092902', '2019-07-14 13:45:25.092936', 2, 'Mjj', 0, '前美团前端项目组架构师', NULL, 'teacher/mjj_icon.png', '是马JJ老师, 一个集美貌与才华于一身的男人，搞过几年IOS，又转了前端开发几年，曾就职于美团网任高级前端开发，后来因为不同意王兴(美团老板)的战略布局而出家做老师去了，有丰富的教学经验，开起车来也毫不含糊。一直专注在前端的前沿技术领域。同时，爱好抽烟、喝酒、烫头(锡纸烫)。 我的最爱是前端，因为前端妹子多。');
INSERT INTO `luffy_teacher` VALUES (3, 0, 1, '2019-07-14 13:46:21.997846', '2019-07-14 13:46:21.997880', 3, 'Lyy', 0, '老男孩Linux学科带头人', NULL, 'teacher/lyy_icon.png', 'Linux运维技术专家，老男孩Linux金牌讲师，讲课风趣幽默、深入浅出、声音洪亮到爆炸');
COMMIT;

-- ----------------------------
-- Table structure for luffy_user
-- ----------------------------
DROP TABLE IF EXISTS `luffy_user`;
CREATE TABLE `luffy_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `password` varchar(128) NOT NULL,
  `last_login` datetime(6) DEFAULT NULL,
  `is_superuser` tinyint(1) NOT NULL,
  `username` varchar(150) NOT NULL,
  `first_name` varchar(30) NOT NULL,
  `last_name` varchar(150) NOT NULL,
  `email` varchar(254) NOT NULL,
  `is_staff` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `date_joined` datetime(6) NOT NULL,
  `mobile` varchar(11) NOT NULL,
  `icon` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_user
-- ----------------------------
BEGIN;
INSERT INTO `luffy_user` VALUES (1, 'pbkdf2_sha256$150000$qmtgkOfc98T9$hMY5cwKeATlGK71LM7/V70VnSFdlhcDv/7s7O/jrVpE=', '2021-08-12 16:10:18.366217', 1, 'lqz', '', '', '3@qq.com', 1, 1, '2021-08-12 16:09:53.455295', '', 'icon/default.png');
COMMIT;

-- ----------------------------
-- Table structure for luffy_user_groups
-- ----------------------------
DROP TABLE IF EXISTS `luffy_user_groups`;
CREATE TABLE `luffy_user_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `luffy_user_groups_user_id_group_id_65493864_uniq` (`user_id`,`group_id`),
  KEY `luffy_user_groups_group_id_2c552c5a_fk_auth_group_id` (`group_id`),
  CONSTRAINT `luffy_user_groups_group_id_2c552c5a_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
  CONSTRAINT `luffy_user_groups_user_id_118ec1b6_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_user_groups
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for luffy_user_user_permissions
-- ----------------------------
DROP TABLE IF EXISTS `luffy_user_user_permissions`;
CREATE TABLE `luffy_user_user_permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `luffy_user_user_permissions_user_id_permission_id_a7014396_uniq` (`user_id`,`permission_id`),
  KEY `luffy_user_user_perm_permission_id_3150f78c_fk_auth_perm` (`permission_id`),
  CONSTRAINT `luffy_user_user_perm_permission_id_3150f78c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `luffy_user_user_permissions_user_id_b132f823_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of luffy_user_user_permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for reversion_revision
-- ----------------------------
DROP TABLE IF EXISTS `reversion_revision`;
CREATE TABLE `reversion_revision` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_created` datetime(6) NOT NULL,
  `comment` longtext NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reversion_revision_date_created_96f7c20c` (`date_created`),
  KEY `reversion_revision_user_id_17095f45_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `reversion_revision_user_id_17095f45_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of reversion_revision
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for reversion_version
-- ----------------------------
DROP TABLE IF EXISTS `reversion_version`;
CREATE TABLE `reversion_version` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` varchar(191) NOT NULL,
  `format` varchar(255) NOT NULL,
  `serialized_data` longtext NOT NULL,
  `object_repr` longtext NOT NULL,
  `content_type_id` int(11) NOT NULL,
  `revision_id` int(11) NOT NULL,
  `db` varchar(191) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `reversion_version_db_content_type_id_objec_b2c54f65_uniq` (`db`,`content_type_id`,`object_id`,`revision_id`),
  KEY `reversion_version_content_type_id_7d0ff25c_fk_django_co` (`content_type_id`),
  KEY `reversion_version_revision_id_af9f6a9d_fk_reversion_revision_id` (`revision_id`),
  CONSTRAINT `reversion_version_content_type_id_7d0ff25c_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `reversion_version_revision_id_af9f6a9d_fk_reversion_revision_id` FOREIGN KEY (`revision_id`) REFERENCES `reversion_revision` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of reversion_version
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for xadmin_bookmark
-- ----------------------------
DROP TABLE IF EXISTS `xadmin_bookmark`;
CREATE TABLE `xadmin_bookmark` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(128) NOT NULL,
  `url_name` varchar(64) NOT NULL,
  `query` varchar(1000) NOT NULL,
  `is_share` tinyint(1) NOT NULL,
  `content_type_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `xadmin_bookmark_content_type_id_60941679_fk_django_co` (`content_type_id`),
  KEY `xadmin_bookmark_user_id_42d307fc_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `xadmin_bookmark_content_type_id_60941679_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `xadmin_bookmark_user_id_42d307fc_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of xadmin_bookmark
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for xadmin_log
-- ----------------------------
DROP TABLE IF EXISTS `xadmin_log`;
CREATE TABLE `xadmin_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `action_time` datetime(6) NOT NULL,
  `ip_addr` char(39) DEFAULT NULL,
  `object_id` longtext,
  `object_repr` varchar(200) NOT NULL,
  `action_flag` varchar(32) NOT NULL,
  `message` longtext NOT NULL,
  `content_type_id` int(11) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `xadmin_log_content_type_id_2a6cb852_fk_django_content_type_id` (`content_type_id`),
  KEY `xadmin_log_user_id_bb16a176_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `xadmin_log_content_type_id_2a6cb852_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `xadmin_log_user_id_bb16a176_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of xadmin_log
-- ----------------------------
BEGIN;
INSERT INTO `xadmin_log` VALUES (1, '2021-08-12 16:11:27.459046', '127.0.0.1', '1', 'banner1', 'create', '已添加。', 13, 1);
INSERT INTO `xadmin_log` VALUES (2, '2021-08-12 16:11:42.477108', '127.0.0.1', '2', 'banner2', 'create', '已添加。', 13, 1);
INSERT INTO `xadmin_log` VALUES (3, '2021-08-12 16:11:58.508536', '127.0.0.1', '3', 'banner2', 'create', '已添加。', 13, 1);
INSERT INTO `xadmin_log` VALUES (4, '2021-08-12 16:12:20.240150', '127.0.0.1', '4', 'banner4', 'create', '已添加。', 13, 1);
COMMIT;

-- ----------------------------
-- Table structure for xadmin_usersettings
-- ----------------------------
DROP TABLE IF EXISTS `xadmin_usersettings`;
CREATE TABLE `xadmin_usersettings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `key` varchar(256) NOT NULL,
  `value` longtext NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `xadmin_usersettings_user_id_edeabe4a_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `xadmin_usersettings_user_id_edeabe4a_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of xadmin_usersettings
-- ----------------------------
BEGIN;
INSERT INTO `xadmin_usersettings` VALUES (1, 'dashboard:home:pos', '', 1);
COMMIT;

-- ----------------------------
-- Table structure for xadmin_userwidget
-- ----------------------------
DROP TABLE IF EXISTS `xadmin_userwidget`;
CREATE TABLE `xadmin_userwidget` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `page_id` varchar(256) NOT NULL,
  `widget_type` varchar(50) NOT NULL,
  `value` longtext NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `xadmin_userwidget_user_id_c159233a_fk_luffy_user_id` (`user_id`),
  CONSTRAINT `xadmin_userwidget_user_id_c159233a_fk_luffy_user_id` FOREIGN KEY (`user_id`) REFERENCES `luffy_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of xadmin_userwidget
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
